n=int(input())
delta=10**(-n)
x=2**(0.5)
y=x/2
times=1
while True:
    x=(x+2)**(0.5)
    last=y
    y*=(x/2)
    times+=1
    if abs(2/y-2/last)<=delta:
        break
print(times)
print(round(2/y,n))